/*
package com.wmx.config;

import com.ctrip.framework.apollo.model.ConfigChangeEvent;
import com.ctrip.framework.apollo.spring.annotation.ApolloConfigChangeListener;
import org.springframework.boot.autoconfigure.data.redis.RedisProperties;
import org.springframework.cloud.context.scope.refresh.RefreshScope;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

*/
/**********************************
 * @author wmx
 * @date 2019/11/7 10:19
 * @description:
 * @version 1.0
 ************************************//*

@Component
public class RefreshConfig {
    @Resource
    private DevConfig devConfig;

    @Resource
    private MyRefreshScope myRefreshScope;


    @ApolloConfigChangeListener("dev.apollo")
    public void onChange(ConfigChangeEvent configChangeEvent) {
        boolean configChange = false;
        for (String cKey : configChangeEvent.changedKeys()) {
            if (cKey.startsWith("dev")) {
                configChange = true;
                break;
            }
        }
        if (!configChange) {
            return;
        }

        myRefreshScope.refresh("devConfig");
    }
}
*/
